home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / comm / 110a115a.zip / SCRIPTS.ZIP / SHOWOFF.SLT < prev    next >
Text File  |  1995-12-21  |  3KB  |  76 lines

  1. /****************************************************************/
  2. /*                                                              */
  3. /*  Demo of how to use various DOS functions; break signals;    */
  4. /*  miscellaneous video and such.                               */
  5. /*                                                              */
  6. /*                   Copyright 1995 deltaComm Development, Inc. */
  7. /*                                                              */
  8. /****************************************************************/
  9.  
  10. main()
  11. {
  12.  int vpic, c;
  13.  str ss[64];
  14.  
  15.  vpic=vsavearea(0, 0, 79, 24);               // Store current screen in memory
  16.  call("scrnwip.slc");                        // Call screen wipe script
  17.  
  18.  prints_trm("In this color...");
  19.  prints_trm("  then a little ANSI magic...");
  20.  
  21.  printsc_trm("^[[");         // Run a color change
  22.  printn_trm(31);             // through the
  23.  printc_trm('m');            // terminal via ANSI escape sequences....
  24.  
  25.  send_brk(10);               // send a comm BREAK signal
  26.  
  27.  c=cgetct(100);              // Wait a bit for a keypress (up to 10 seconds)
  28.  
  29.  prints_trm("In another color.");
  30.  
  31.  if (argcount>=0)            // If we got a char, send it along to
  32.    if (c)                    // the tracking functions for addition
  33.      track_addchr(c);
  34.  
  35.  getrunpath(ss);             // Where was TFW run from?
  36.  printsc("Current Run Directory: ");
  37.  prints(ss);
  38.  
  39.  prints("Press any key to change to the root directory");
  40.  prints("and view it's contents.");
  41.  inkeyw();                                   // Wait for keypress
  42.  newdir("\");                                // Go to root directory
  43.  show_directory("*.*", 0, 0);                // Display directory
  44.  
  45.  if (carrier())                              // Test for carrier
  46.   newline();                                 // Line feed locally & over modem
  47.  else
  48.   cnewline();                                // Local line feed only
  49.  
  50.  prints("Press any key to display the help screen.");
  51.  inkeyw();
  52.  helpscreen();                               // Enter current help screen
  53.  
  54.  if (carrier())
  55.   newline();
  56.  else
  57.   cnewline();
  58.  
  59.  prints("Press any key to display the DOS functions menu.");
  60.  inkeyw();
  61.  dosfunction();                                  // DOS function menu
  62.  printsc("This script is named: ");
  63.  prints(__file__);                               // Print active filename
  64.  printsc("Executing line ");
  65.  printn(__line__);                               // Print active line number
  66.  
  67.  prints();
  68.  prints("Press any key to restore original screen.");
  69.  inkeyw();
  70.  vrstrarea(vpic);                                // Restore original screen
  71.  
  72.  prints("Now for a little entertainment...(Press a key)");
  73.  inkeyw();
  74.  run("c:\windows\sol.exe", "", 0);
  75. }
  76.